import {createRouter,createWebHistory} from "vue-router";

const router = createRouter({
    history: createWebHistory(),
    routes: [
        {
            path: "/",
            name: "Index",
            component: ()=>import('../components/view/Index.vue'),
            children: [
                //{
                //    path: "/user/selfInfo",
                //    name: "HomeSelfInfo",
                //    component: ()=>import('../components/home/SelfInfo.vue'),
                //},
                //{
                //    path: "/user/displayList",
                //    name: "DisplayList",
                //    component: ()=>import('../components/inspiration/DisplayList.vue'),
                //    props: route => ({ query: route.query.query })
                //}
            ]
        },
        {
            path: "/loginOut",
            name: "LoginOut",
            component: ()=>import('../components/lar/LoginOut.vue'),
            children: [
                {
                    path: "/login",
                    name: "Login",
                    component: ()=>import('../components/lar/Login.vue'),
                },
                {
                    path: '/registered',
                    name: 'Registered',
                    component: ()=>import('../components/lar/registered.vue'),
                }
            ]
        },
        {
             path:"/404",
             name:"NotFound",
             component:() => import ("../components/view/NotFound.vue")
        },
        {
             path:"/:pathMatch(.*)",
             redirect:"/404"
        }
    ]
})

export default router;
